Skip to content

Hotfix: customize title for test#352

Merged
AnilSorathiya merged 1 commit intomainfrom
Anil/hotfix-for-test-title
Apr 16, 2025
Merged

Hotfix: customize title for test#352
AnilSorathiya merged 1 commit intomainfrom
Anil/hotfix-for-test-title

Conversation

@AnilSorathiya
Copy link
Contributor

Internal Notes for Reviewers

This is hotfix for fix to set the title for test when it has been pass to the run_test.

image

@AnilSorathiya AnilSorathiya added bug Something isn't working internal Not to be externalized in the release notes labels Apr 16, 2025
@github-actions
Copy link
Contributor

PR Summary

This pull request introduces an enhancement to the _run_test function in the validmind/tests/run.py file by adding an optional title parameter. This parameter allows users to specify a title for the test, which is then included in the TestResult object. The changes ensure that the title is passed through the function call chain, allowing for more descriptive test results.

The specific changes include:

  • Modifying the _run_test function signature to include an optional title parameter with a default value of None.
  • Updating the TestResult instantiation to include the title parameter.
  • Adjusting the run_test function to pass the title parameter when calling _run_test.

Test Suggestions

  • Test the _run_test function with and without the title parameter to ensure it handles both cases correctly.
  • Verify that the TestResult object includes the title when provided.
  • Check that existing tests that do not use the title parameter continue to function as expected.
  • Test the run_test function to ensure it correctly passes the title parameter to _run_test.

Copy link
Contributor

@johnwalz97 johnwalz97 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

@AnilSorathiya AnilSorathiya merged commit 801b26c into main Apr 16, 2025
8 checks passed
@johnwalz97 johnwalz97 deleted the Anil/hotfix-for-test-title branch April 16, 2025 16:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working internal Not to be externalized in the release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants